var index;//页面索引
var utils = {
//打开对话框(查看)
    openDialogView:function(title,url,width,height,type){
    if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
        width='auto';
        height='auto';
    }else{//如果是PC端，根据用户设置的width和height显示。

    }
        index = layer.open({
               type: type,
               offset: '50px',
               skin: 'layui-layer-molv',
              title: title,
              area: [width, height],
              maxmin: true, //开启最大化最小化按钮
               content: url
       });
    },
    //打开导入exvel窗口
     openDialogExcelView:function(winurl,impurl){
        top.layer.open({
            type: 1,
            area: [500, 300],
            title:"导入数据",
            content:$("#importBox").html() ,
            btn: ['下载模板','确定', '关闭'],
            btn1: function(index, layero){
                window.location.href=winurl;
            },
            btn2: function(index, layero){
                var formData = new FormData(top.$( "#importForm" )[0]);
                $.ajax({
                    url: impurl ,
                    type: 'POST',
                    data: formData,
                    async: false,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success: function(r){
                        if(r.code === 0){
                            alert('导入成功', function(){
                                vm.reload();
                            });
                        }else{
                            alert(r.msg,function(){
                                vm.reload();
                            });
                        }
                    }
                });
               // top.layer.close(index);
            },
            btn3: function(index){
                top.layer.close(index);
            }
        });
    },
    //打开审批窗口adopt需要改的状态
    openAuditView:function(url,audit,id,grid){
        layer.open({
            content: "确定对此数据进行操作?",
            btn: ['通过', '驳回', '关闭'],
            btn1:function(index, layero){
                utils.audit(url,audit,id,grid);
                layer.close(index);
            },
            btn2:function(index, layero){
                utils.audit(url,0,id,grid);
                layer.close(index);
            },
            btn3:function(index){
                layer.close(index);
            }
        });
    },
    //审批调用的url
    audit:function(url,audit,id,grid){
        var params = {
            audit:audit,
            id:id
        }
         $.ajax({
             type: "POST",
             url: url,
             contentType: "application/json",
             dataType:"json",
             async:false,
             cache:false,
             data: JSON.stringify(params),
             success: function(r) {
                 if (r.code == 0) {
                     alert('操作成功', function (index) {
                         grid.trigger("reloadGrid");
                     });
                 } else {
                     alert(r.msg);
                 }
             }
          });
    },
    //获取字典信息
    getDictList: function(obj){
        var dictlist;
        var params = {
            dicttype:obj
        }
        $.ajax({
            type: "POST",
            url: "../dictutils/getDictList",
            contentType: "application/json",
            data: JSON.stringify(params),
            dataType:"json",
            async:false,
            cache:false,
            success: function(r){
                if(r.code === 0){
                    dictlist = r;
                }else{
                    alert(r.msg);
                }
            }
        });
        return dictlist;
    },
    popGrid:function(winurl,impurl){

        $("#popGrid").jqGrid({
            url: '../empInfo/list',
            postData:{
                'iswork': '1',
            },
            datatype: "json",
            colModel: [
                { label: '员工编号', name: 'id', index: 'id', width: 80, key: true,hidden:true },
                { label: '员工姓名', name: 'name', index: 'name', width: 80 },
                { label: '身份证号', name: 'idno', index: 'idno', width: 80 },
                { label: '公司名称', name: 'company', index: 'company', width: 120 },
                { label: '公司id', name: 'companyId', index: 'company_id', width: 80 ,hidden:true},
                { label: '部门', name: 'department', index: 'department', width: 100 },
                { label: '岗位名称', name: 'post', index: 'post', width: 100 },
                { label: '入职日期', name: 'joinDate', index: 'join_date',  width: 90, formatter:"date", formatoptions: {newformat:'Y-m-d'}
                },
                { label: '性别', name: 'sex', index: 'sex', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "男";
                        }else if(v=="1"){
                            return "女";
                        }else{
                            return ""
                        }
                    } },
                { label: '年龄', name: 'age', index: 'age', width: 80 },
                { label: '电话号码', name: 'telphone', index: 'telphone', width: 100},
                { label: '学历', name: 'education', index: 'education', width: 100 ,formatter:getDictInfo},
                { label: '岗位级别', name: 'postLevel', index: 'post_Level', width: 100 }

            ],
            viewrecords: true,
            height: 385,
            rowNum: 10,
            rowList : [10,30,50],
            rownumbers: true,
            rownumWidth: 25,
            autowidth:true,
            multiselect: false,
            pager: "#popGridPager",
            jsonReader : {
                root: "page.list",
                page: "page.currPage",
                total: "page.totalPage",
                records: "page.totalCount"
            },
            prmNames : {
                page:"page",
                rows:"limit",
                order: "order"
            },
            gridComplete:function(){
                //隐藏grid底部滚动条
                //$("#popGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
            }
        });

    },

    popHistory:function(piid,impurl){
        $("#popHistoryGrid").jqGrid({
            url: '../acthistory/list',
            datatype: "json",
            postData:{
                'piid': piid,
            },
            height:'50%',
            colModel: [
                { label: 'id', name: 'id', index: 'id', width: 50, key: true,hidden:true },
                { label: '流程单号', name: 'piid', index: 'piid', width: 80 },
                { label: '流程名称', name: 'processName', index: 'process_name', width: 80 ,hidden:true},
                { label: '流程级别', name: 'processLevel', index: 'process_level', width: 100 ,
                    formatter:function(v){
                        if(v==""||v==null){
                            return "<font  color='green'>未提交</font>";
                        }
                        else if(v=="1"){
                            return "<font  color='red'>一级主管审批</font>";
                        }else if(v=="2"){
                            return "<font  color='red'>二级主管审批</font>";
                        }else if(v=="3"){
                            return "<font  color='red'>三级主管审批</font>";
                        }else if(v=="0"){
                            return "<font  color='green'>审批完成</font>";
                        }else if(v=="10"){
                            return "<font  color='red'>被拒绝</font>";
                        }
                    } },
                { label: '审批人', name: 'username', index: 'username', width: 80 },
                { label: '审批时间', name: 'approveDate', index: 'approve_date', width: 123 },
                { label: '审批结果', name: 'result', index: 'result', width: 80 },
                { label: '备注', name: 'remark', index: 'remark', width: 120 }
            ],
            viewrecords: true,
            height: 240,
            rowNum: 10,
            rowList : [10,30,50],
            rownumbers: true,
            rownumWidth: 25,
            autowidth:true,
            multiselect: true,
            shrinkToFit:false,
            autoScroll: false,
            pager: "#popHistoryGridPager",
            jsonReader : {
                root: "page.list",
                page: "page.currPage",
                total: "page.totalPage",
                records: "page.totalCount"
            },
            prmNames : {
                page:"page",
                rows:"limit",
                order: "order"
            },

            gridComplete:function(){
                //隐藏grid底部滚动条
                $("#popHistoryGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
            }
        });

    },


//获取跳转页面传递过来的参数
    getParameter:function(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]); return null;
    },

    //关闭当前窗口
    closeCurrentPage:function(){
        if(index==undefined){
            index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index);
        }else{
            layer.close(index);
        }
    },
    //只能输入正数保留两位
    clearNoNum:function (obj) {
    obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
    obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字而不是
    obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个. 清除多余的
    obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
    obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数
    },

}

var popPage={
    //从组织架构选择部门
    popOfficeGrid:function(winurl,impurl){
    $("#popOfficeGrid").jqGrid({
    url: '../sysoffice/list',
    datatype: "json",
    colModel: [
        { label: 'id', name: 'id', index: 'id', width: 50, key: true, key:true ,hidden:true},
        { label: '父级编号', name: 'parentId', index: 'parent_id', width: 80, hidden:true },
        { label: '名称', name: 'name', index: 'name' , width: 308},
        { label: '排序', name: 'sort', index: 'sort', hidden:true },
        { label: '归属区域', name: 'areaId', index: 'area_id',hidden:true },
        { label: '区域编码', name: 'code', index: 'code', hidden:true },
        { label: '机构类型', name: 'type', index: 'type', hidden:true },
        { label: '机构等级', name: 'grade', index: 'grade', hidden:true },
        { label: '联系地址', name: 'address', index: 'address', width: 80 ,hidden:true},
        { label: '邮政编码', name: 'zipCode', index: 'zip_code', hidden:true },
        { label: '负责人', name: 'master', index: 'master', hidden:true},
        { label: '电话', name: 'phone', index: 'phone', width: 80,hidden:true },
        { label: '传真', name: 'fax', index: 'fax', width: 80 ,hidden:true},
        { label: '邮箱', name: 'email', index: 'email', width: 80 ,hidden:true},
        { label: '是否公司', name: 'isConmpany', index: 'isConmpany', hidden:true },
        { label: '是否启用', name: 'useable', index: 'USEABLE', hidden:true },
        { label: '主负责人', name: 'primaryPerson', index: 'PRIMARY_PERSON', hidden:true },
        { label: '副负责人', name: 'deputyPerson', index: 'DEPUTY_PERSON', hidden:true },
        { label: '创建者', name: 'createBy', index: 'create_by', hidden:true },
        { label: '创建时间', name: 'createDate', index: 'create_date', hidden:true },
        { label: '更新者', name: 'updateBy', index: 'update_by', hidden:true },
        { label: '更新时间', name: 'updateDate', index: 'update_date', hidden:true },
        { label: '备注信息', name: 'remarks', index: 'remarks', hidden:true },
        { label: '删除标记', name: 'delFlag', index: 'del_flag', hidden:true }
    ],
    viewrecords: false,
    treeGrid: true,
    // datatype
    treedatatype:"json",
    // the model used
    treeGridModel:"adjacency",//nested
    ExpandColumn : 'name',
    scroll: "true",
    loadonce: true,
    width:"auto",
    //height: 385,
    rowNum: 100,
    /* rowList : [10,30,50],
     rownumbers: true,
     rownumWidth: 25,*/
    autowidth:true,
    multiselect: true,
    // pager: "#jqGridPager",
    jsonReader : {
        root: "page.list",
        page: "page.currPage",
        total: "page.totalPage",
        records: "page.totalCount"
    },
    treeReader:{
        level_field: "level",
        parent_id_field: "parentId", // then why does your table use "parent_id"?
        leaf_field: "isleaf",
        loaded:"loaded",
        expanded_field: "expanded",
        icon_field:"icon"
    },
    prmNames : {
        page:"page",
        rows:"limit",
        order: "order"
    },
    height: "auto",    // 设为具体数值则会根据实际记录数出现垂直滚动条
    //rowNum : "-1",     // 显示全部记录
    sortable:true,
    sortorder:"desc",
    //shrinkToFit:false,  // 控制水平滚动条
    gridComplete:function(){
        //隐藏grid底部滚动条
        $("#popOfficeGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
    }
});
    },
//选择系统角色
    popRoleGrid:function(winurl,impurl){
        $("#popRoleGrid").jqGrid({
        url: '../sys/role/list',
        datatype: "json",
        colModel: [
            { label: '角色ID', name: 'roleId', index: "role_id", width: 45, key: true,hidden:true },
            { label: '角色名称', name: 'roleName', index: "role_name", width: 120 },
            { label: '备注', name: 'remark', width: 100 },
            { label: '创建时间', name: 'createTime', index: "create_time", width: 150}
        ],
        viewrecords: true,
        height: 400,
        rowNum: 100,
       /* rowList : [10,30,50],
        rownumbers: true,
        rownumWidth: 25,*/
        autowidth:true,
        multiselect: true,
        shrinkToFit:false,
        autoScroll: false,
        pager: "#popRoleGridPager",
        jsonReader : {
            root: "page.list",
            page: "page.currPage",
            total: "page.totalPage",
            records: "page.totalCount"
        },
        prmNames : {
            page:"page",
            rows:"limit",
            order: "order"
        },
        gridComplete:function(){
            //隐藏grid底部滚动条
            $("#popRoleGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
        }
        });
    },

    //选择系统账号
    popUserGrid:function(winurl,impurl,flag){
        var isTrue=false;
        if(flag!=null&&flag!=""){
            isTrue=true;
        }

        $("#popUserGrid").jqGrid({
            url: '../sys/user/list',
            datatype: "json",
            colModel: [
                { label: '用户ID', name: 'userId', index: "user_id", width: 45, key: true,hidden:true },
                { label: '手机号', name: 'mobile', width: 100 },
                { label: '用户名', name: 'username', width: 75 },
                { label: '姓名', name: 'userdesc', width: 75 },
                { label: '邮箱', name: 'email', width: 90 },
                { label: '公司', name: 'company', width: 100 },
                { label: '身份证号', name: 'idno', index: 'idno', width: 80 , hidden:true},

                { label: '公司代码', name: 'companyId', width: 100 , hidden:true},
                { label: '部门', name: 'dept', width: 100 },
                { label: '部门', name: 'deptNo', hidden:true },
                { label: '岗位', name: 'post', width: 100 ,formatter:getDictInfo},
                { label: '角色', name: 'roleName', width: 100 },
                { label: '是否主管', name: 'issupervisor', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "是";
                        }else  if(v=="1"){
                            return "否"
                        }else {
                            return "";
                        }
                    } },
                { label: '状态', name: 'status', width: 80, formatter: function(value, options, row){
                    return value === 0 ?
                        '<span class="label label-danger">禁用</span>' :
                        '<span class="label label-success">正常</span>';
                }},
                { label: '创建时间', name: 'createTime', index: "create_time", width: 80}
            ],
            viewrecords: true,
            height: 385,
            rowNum: 10,
            rowList : [10,30,50],
            rownumbers: true,
            rownumWidth: 25,
            autowidth:true,
            multiselect:isTrue,
            pager: "#popUserGridPager",
            jsonReader : {
                root: "page.list",
                page: "page.currPage",
                total: "page.totalPage",
                records: "page.totalCount"
            },
            prmNames : {
                page:"page",
                rows:"limit",
                order: "order"
            },
            gridComplete:function(){
                //隐藏grid底部滚动条
                $("#popUserGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
            }
        });
    },




    //选择部门
        popDeptGrid:function(winurl,impurl,flag){
            var isTrue=false;
            if(flag!=null&&flag!=""){
                isTrue=true;
            }
        $("#jqGridselect").jqGrid({
            url: '../sysoffice/selectDept',
            datatype: "json",
            colModel: [
                { label: 'id', name: 'id', index: "id", width: 45, key: true,hidden:true },
                { label: '名称', name: 'name', index: "name", width: 200 },
            ],
            viewrecords: true,
            height: 300,
            rowNum: 10000,
            rowList : [10,30,50],
            rownumbers: true,
            rownumWidth: 25,
            autowidth:true,
            multiselect:isTrue,
            // pager: "#popUserGridPager",
            jsonReader : {
                root: "page.list",
                page: "page.currPage",
                total: "page.totalPage",
                records: "page.totalCount"
            },
            prmNames : {
                page:"page",
                rows:"limit",
                order: "order"
            },
            gridComplete:function(){
                //隐藏grid底部滚动条
                $("#jqGridselect").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
            }
        });
    },
//选所有员工
    popAllUser:function(winurl,impurl){

        $("#popGrid").jqGrid({
            url: '../empInfo/listAll',
            postData:{
                'iswork': '1',
            },
            datatype: "json",
            colModel: [
                { label: '员工编号', name: 'id', index: 'id', width: 80, key: true,hidden:true },
                { label: '员工姓名', name: 'name', index: 'name', width: 80 },
                { label: '身份证号', name: 'idno', index: 'idno', width: 80 },
                { label: '公司名称', name: 'company', index: 'company', width: 120 },
                { label: '公司id', name: 'companyId', index: 'company_id', width: 80 ,hidden:true},
                { label: '部门', name: 'department', index: 'department', width: 100 },
                { label: '岗位名称', name: 'post', index: 'post', width: 100 },
                { label: '入职日期', name: 'joinDate', index: 'join_date',  width: 90, formatter:"date", formatoptions: {newformat:'Y-m-d'}
                },
                { label: '性别', name: 'sex', index: 'sex', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "男";
                        }else if(v=="1"){
                            return "女";
                        }else{
                            return ""
                        }
                    } },
                { label: '年龄', name: 'age', index: 'age', width: 80 },
                { label: '电话号码', name: 'telphone', index: 'telphone', width: 100},
                { label: '学历', name: 'education', index: 'education', width: 100 ,formatter:getDictInfo},
                { label: '岗位级别', name: 'postLevel', index: 'post_Level', width: 100 }

            ],
            viewrecords: true,
            height: 385,
            rowNum: 10,
            rowList : [10,30,50],
            rownumbers: true,
            rownumWidth: 25,
            autowidth:true,
            multiselect: false,
            pager: "#popGridPager",
            jsonReader : {
                root: "page.list",
                page: "page.currPage",
                total: "page.totalPage",
                records: "page.totalCount"
            },
            prmNames : {
                page:"page",
                rows:"limit",
                order: "order"
            },
            gridComplete:function(){
                //隐藏grid底部滚动条
                //$("#popGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
            }
        });

    },


    popSettlement:function(winurl,impurl){

        $("#popSettlementGrid").jqGrid({
            url: '../customsettlement/list',
            datatype: "json",
            colModel: [
                { label: 'id', name: 'id', index: 'id', width: 50, key: true ,hidden: true},
                { label: '区域基数表', name: 'areaBaseId', index: 'area_base_id', width: 80 ,hidden: true,
                    formatter:function(v){
                        return  queryByIndex(v);
                    } },
                { label: '单位名称', name: 'unitName', index: 'unit_name', width: 80 },
                { label: '合同编号', name: 'contractNo', index: 'contract_no', width: 80 ,hidden: true},
                { label: '结算点编码', name: 'settlementNo', index: 'settlement_no', width: 80 ,hidden: true},
                { label: '结算点简码', name: 'settlementCode', index: 'settlement_code', width: 80 ,hidden: true},
                { label: '结算点名称', name: 'settlementName', index: 'settlement_name', width: 80 },
                { label: '申报原则', name: 'principle', index: 'principle', width: 80 ,hidden: true},
                { label: '滞后天数', name: 'delay', index: 'delay', width: 80 ,hidden: true},
                { label: '是否需体检', name: 'healthCheckup', index: 'health_checkup', width: 80,  formatter:function(v){
                    if(v=="1"){
                        return "是";
                    }else if(v=="0") {
                        return "否"
                    }else{
                        return "";
                    }
                }},
                { label: '求职登记录', name: 'jobRegistration', index: 'job_registration', width: 80 ,formatter:function(v){
                    if(v=="1"){
                        return "是";
                    }else if(v=="0") {
                        return "否"
                    }else{
                        return "";
                    }
                }},
                { label: '是否需身份证', name: 'identityCard', index: 'identity_card', width: 80 ,formatter:function(v){
                if(v=="1"){
                        return "是";
                    }else if(v=="0") {
                        return "否"
                    }else{
                        return "";
                    }
                  }},
                { label: '是否需相片', name: 'picture', index: 'picture', width: 80 ,formatter:function(v){
                    if(v=="1"){
                        return "是";
                    }else if(v=="0") {
                        return "否"
                    }else{
                        return "";
                    }
                }},
                { label: '劳动合同', name: 'contract', index: 'contract', width: 80 ,hidden: true},
                { label: '员工手册签收单', name: 'ygscqsd', index: 'ygscqsd', width: 80 ,hidden: true},
                { label: '体检表', name: 'healthForm', index: 'health_form', width: 80 ,formatter:function(v){
                    if(v=="1"){
                        return "是";
                    }else if(v=="0") {
                        return "否"
                    }else{
                        return "";
                    }
                }},
                { label: '员工核定基数', name: 'empBaseNum', index: 'emp_base_num', width: 80 ,hidden: true},
                { label: '申报原则', name: 'declarPrinciple', index: 'declar_principle', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } ,hidden: true},
                { label: '五险申报', name: 'fiveInsurance', index: 'five_insurance', width: 80,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } ,hidden: true},
                { label: '工伤申报', name: 'injuryDeclar', index: 'injury_declar', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } ,hidden: true},
                { label: '养老申报', name: 'pensionDeclar', index: 'pension_declar', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } ,hidden: true},
                { label: '失业申报', name: 'unemploymentDeclar', index: 'unemployment_declar', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } ,hidden: true},
                { label: '医疗申报', name: 'medicareClar', index: 'medicare_clar', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } },
                { label: '生育申报', name: 'maternityClar', index: 'maternity_clar', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } ,hidden: true},
                { label: '公积金申报', name: 'accumulationFundDeclar', index: 'accumulation_fund_declar', width: 80 ,
                    formatter:function(v){
                        if(v=="0"){
                            return "自动";
                        }else{
                            return "手动"
                        }
                    } ,hidden: true},
                { label: '五险参保代码', name: 'fiveInsuranceCode', index: 'five_insurance_code', width: 80 ,hidden: true},
                { label: '工伤参保代码', name: 'injuryDeclarCode', index: 'injury_declar_code', width: 80,hidden: true },
                { label: '养老参保代码', name: 'pensionDeclarCode', index: 'pension_declar_code', width: 80 ,hidden: true},
                { label: '失业参保代码', name: 'unemploymentDeclarCode', index: 'unemployment_declar_code', width: 80 ,hidden: true},
                { label: '医疗参保代码', name: 'medicareClarCode', index: 'medicare_clar_code', width: 80 ,hidden: true},
                { label: '生育参保代码', name: 'maternityClarCode', index: 'maternity_clar_code', width: 80 ,hidden: true},
                { label: '公积金参保代码', name: 'accumulationFundDeclarCode', index: 'accumulation_fund_declar_code', width: 80 ,hidden: true},
                { label: '工伤报退限制:25', name: 'injuryExitLimit', index: 'injury_exit_limit', width: 80 ,hidden: true},
                { label: '结算模式', name: 'settlementMode', index: 'settlement_mode', width: 80 ,hidden: true},
                { label: '失业享受限制,多少天内', name: 'unemploymentEnjoyLimit', index: 'unemployment_enjoy_limit', width: 80 ,hidden: true},
                { label: '入职档案移交时限，30', name: 'entryMoveLimit', index: 'entry_move_limit', width: 80 ,hidden: true},
                { label: '离职档案移交时限，30', name: 'leaveMoveLimit', index: 'leave_move_limit', width: 80 ,hidden: true},
                { label: '合同续签变更档案移交时限，30', name: 'contractMoveLimit', index: 'contract_move_limit', width: 80,hidden: true }
            ],
            viewrecords: true,
            height: $(window).height()*0.8,
            rowNum: 10,
            rowList : [10,30,50],
            rownumbers: true,
            rownumWidth: 25,
            autowidth:true,
            multiselect: false,
            pager: "#popSettlementGridPager",
            //字段太多自动加载横轴滚动条
            shrinkToFit:false,
            autoScroll: false,
            jsonReader : {
                root: "page.list",
                page: "page.currPage",
                total: "page.totalPage",
                records: "page.totalCount"
            },
            prmNames : {
                page:"page",
                rows:"limit",
                order: "order"
            },
            gridComplete:function(){
                //隐藏grid底部滚动条
                $("#popSettlementGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
            }
        });

    },




}
